package inc.unlocked.dao;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;

/**
 * User: MTolstykh
 * Date: 12.12.11
 * Time: 11:45
 */
public interface GenericDAO<ENTITY, ID extends Serializable> {
    ENTITY findById(ID id);
    List<ENTITY> findAll();
    void save(ENTITY entity);
    void delete(ENTITY entity);
    void deleteAll(Collection<ENTITY> entity);
    void saveOrUpdate(ENTITY entity);
}
